package com.fare.taluo.application.crawl;

import java.util.List;

import com.fare.taluo.vo.adapter.AdapterVO;
import com.fare.taluo.vo.core.TaskAdapterEntityVO;

public interface TaskAdapterApplication {

	/**
	 * 删除一个适配器配置
	 * @param id
	 * @throws Exception
	 */
	@Deprecated
	public void deleteTaskAdapterEntity(long id) throws Exception;
	
	/**
	 * 删除一个适配器类名
	 * @param adapterUploadId
	 * @throws Exception
	 */
	@Deprecated
	public void deleteAdapterUploadedEntity(long adapterUploadId) throws Exception;
	/**
	 * 保存或更新一个适配器配置
	 * @param tae
	 * @throws Exception
	 */
	@Deprecated
	public void saveOrUpdateTaskAdapterEntity(TaskAdapterEntityVO tae) throws Exception;

	/**
	 * 修改一个适配器配置
	 * @param tae
	 * @throws Exception
	 */
	@Deprecated
	public void saveM(TaskAdapterEntityVO ftp) throws Exception;
	
	/**
	 * 获取一个适配器配置 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	@Deprecated
	public TaskAdapterEntityVO findTaskAdapterEntityVO(long id) throws Exception;

	/**
	 * 
	 * @param sourceName
	 * @param adapterName
	 * @param adapterClass
	 * @param isEnable
	 * @return
	 */
	@Deprecated
	public List<TaskAdapterEntityVO> findTaskAdapterByConsdions(String sourceId,String isEnable,String adapterName,String adapterClass);

	/**
	 * 保存或更新一个适配器
	 * guokenye
	 * @param vo
	 * @throws Exception
	 */
	public void uploadAdapter(AdapterVO vo) throws Exception;
	
	public List<AdapterVO> findAdapterByConsdions(Long sourceId,Integer isEnable,String adapterClass)throws Exception;
	/**
	 * 打开或者关闭适配器
	 * @param id
	 * @param isEnable
	 * @return
	 * @throws Exception
	 */
	public boolean closeOrOpenAdapter(Long id,Integer isEnable)throws Exception;
	/**
	 * 删除一个适配器同时删除其class文件
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public boolean deleteAdapter(Long id) throws Exception;
	/**
	 * 根据适配器文件id下载
	 * @param adapterId
	 * @return
	 * @throws Exception
	 */
	public AdapterVO downloadAdapterFileById(Long id)throws Exception;
	
}
